package com.hello.system.domain;

import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.hello.common.core.annotation.Excel;
import com.hello.common.core.web.domain.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 设备维护记录对象 device_maintenance_log
 * 
 * @author hello
 * @date 2025-09-09
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class DeviceMaintenanceLog extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 维护ID */
    private Long maintenanceId;

    /** 设备ID */
    @Excel(name = "设备ID")
    private Long deviceId;

    /** 维护类型(routine=例行维护/repair=故障维修/upgrade=升级改造/clean=清洁保养) */
    @Excel(name = "维护类型(routine=例行维护/repair=故障维修/upgrade=升级改造/clean=清洁保养)")
    private String maintenanceType;

    /** 维护内容 */
    @Excel(name = "维护内容")
    private String maintenanceContent;

    /** 维护人员 */
    @Excel(name = "维护人员")
    private String maintenancePerson;

    /** 维护开始时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "维护开始时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date maintenanceStartTime;

    /** 维护结束时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "维护结束时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date maintenanceEndTime;

    /** 维护费用 */
    @Excel(name = "维护费用")
    private BigDecimal maintenanceCost;

    /** 使用的备件(JSON格式) */
    @Excel(name = "使用的备件(JSON格式)")
    private String sparePartsUsed;

    /** 维护结果(success=成功/failed=失败/partial=部分完成) */
    @Excel(name = "维护结果(success=成功/failed=失败/partial=部分完成)")
    private String maintenanceResult;

    /** 维护备注 */
    @Excel(name = "维护备注")
    private String maintenanceNote;

    /** 下次维护日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "下次维护日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date nextMaintenanceDate;

    public void setMaintenanceId(Long maintenanceId) 
    {
        this.maintenanceId = maintenanceId;
    }

    public Long getMaintenanceId() 
    {
        return maintenanceId;
    }
    public void setDeviceId(Long deviceId) 
    {
        this.deviceId = deviceId;
    }

    public Long getDeviceId() 
    {
        return deviceId;
    }
    public void setMaintenanceType(String maintenanceType) 
    {
        this.maintenanceType = maintenanceType;
    }

    public String getMaintenanceType() 
    {
        return maintenanceType;
    }
    public void setMaintenanceContent(String maintenanceContent) 
    {
        this.maintenanceContent = maintenanceContent;
    }

    public String getMaintenanceContent() 
    {
        return maintenanceContent;
    }
    public void setMaintenancePerson(String maintenancePerson) 
    {
        this.maintenancePerson = maintenancePerson;
    }

    public String getMaintenancePerson() 
    {
        return maintenancePerson;
    }
    public void setMaintenanceStartTime(Date maintenanceStartTime) 
    {
        this.maintenanceStartTime = maintenanceStartTime;
    }

    public Date getMaintenanceStartTime() 
    {
        return maintenanceStartTime;
    }
    public void setMaintenanceEndTime(Date maintenanceEndTime) 
    {
        this.maintenanceEndTime = maintenanceEndTime;
    }

    public Date getMaintenanceEndTime() 
    {
        return maintenanceEndTime;
    }
    public void setMaintenanceCost(BigDecimal maintenanceCost) 
    {
        this.maintenanceCost = maintenanceCost;
    }

    public BigDecimal getMaintenanceCost() 
    {
        return maintenanceCost;
    }
    public void setSparePartsUsed(String sparePartsUsed) 
    {
        this.sparePartsUsed = sparePartsUsed;
    }

    public String getSparePartsUsed() 
    {
        return sparePartsUsed;
    }
    public void setMaintenanceResult(String maintenanceResult) 
    {
        this.maintenanceResult = maintenanceResult;
    }

    public String getMaintenanceResult() 
    {
        return maintenanceResult;
    }
    public void setMaintenanceNote(String maintenanceNote) 
    {
        this.maintenanceNote = maintenanceNote;
    }

    public String getMaintenanceNote() 
    {
        return maintenanceNote;
    }
    public void setNextMaintenanceDate(Date nextMaintenanceDate) 
    {
        this.nextMaintenanceDate = nextMaintenanceDate;
    }

    public Date getNextMaintenanceDate() 
    {
        return nextMaintenanceDate;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("maintenanceId", getMaintenanceId())
            .append("deviceId", getDeviceId())
            .append("maintenanceType", getMaintenanceType())
            .append("maintenanceContent", getMaintenanceContent())
            .append("maintenancePerson", getMaintenancePerson())
            .append("maintenanceStartTime", getMaintenanceStartTime())
            .append("maintenanceEndTime", getMaintenanceEndTime())
            .append("maintenanceCost", getMaintenanceCost())
            .append("sparePartsUsed", getSparePartsUsed())
            .append("maintenanceResult", getMaintenanceResult())
            .append("maintenanceNote", getMaintenanceNote())
            .append("nextMaintenanceDate", getNextMaintenanceDate())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .toString();
    }
}
